package com.yuezhi.inv.controller;


import com.yuezhi.inv.entity.CommodityBill;
import com.yuezhi.inv.service.CommodityBillService;
import com.yuezhi.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author boys
 * @since 2020-12-21
 */
@RestController
@RequestMapping("/inv/commodity-bill")
public class CommodityBillController {

    @Autowired
    private CommodityBillService commodityBillService;

    @GetMapping("/listCommName")
    public R getCommNameList(String commName){
        System.out.println(commName);
        List<CommodityBill> commodityBills = commodityBillService.selectCommList(commName);
        return R.success().data("commNameList",commodityBills);
    }
}

